﻿using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using Microsoft.Web.Preview.Services;
using Lx.Web.Common.UI;
using Lx.Web.Common.ControlsUI;
using Model;
using BLF.WWW_WWW.Learn;

namespace WebServices.User
{
    /// <summary>
    /// Learn 的摘要说明
    /// </summary>
    [WebService(Namespace = "http://www.italki.com/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [System.Web.Script.Services.ScriptService]
    public class Learn : System.Web.Services.WebService
    {
        /// <summary>
        /// 获取学习语言的所有会员信息（包括小黑板信息）
        /// </summary>
        /// <param name="learn">学习语言</param>
        /// <param name="pageIndex">pageIndex</param>
        /// <param name="pageSize">pageSize</param>
        /// <param name="recordCount">输出记录</param>
        /// <returns>CommentModel列表</returns>
        [WebMethod]
        public ArrayList GetLearnMembersAndComment(string learnL, int pageIndex, int pageSize)
        {            
            return BLF.WWW_WWW.Learn.Learn.GetLearnMembersAndComment(learnL, pageIndex, pageSize);
        }
        /// <summary>
        /// 增加学习评论
        /// </summary>
        /// <param name="cm">CommentModel</param>
        /// <returns>CommonMessage</returns>
        [WebMethod]
        public CommonMessage AddComments(string learn, string content, string memberno)
        {
            if (HttpContext.Current.User.Identity.Name == "")
            {
                return new CommonMessage();
            }
            return BLF.WWW_WWW.Learn.Learn.AddComments(learn,content,memberno);
        }
    }
}
